﻿using DocumentFormat.OpenXml.Lite.SpreadsheetML.Excel.Types;
using DocumentFormat.OpenXml.Lite.SpreadsheetML.Excel.WorksheetElements;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.SpreadsheetML.Excel.Table
{
    [XmlRoot("tableColumn", Namespace = Constants.ExcelMain)]
    public class XmlColumnProperties : XmlSerializable
    {
        [XmlAttribute("mapId", Form = XmlSchemaForm.Qualified)]
        public uint MapId { get; set; }

        [XmlAttribute("xPath", Form = XmlSchemaForm.Qualified)]
        public string XPath { get; set; }

        [Optional]
        [XmlAttribute("denormalized", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> Denormalized { get; set; }

        [XmlAttribute("xmlDataType", Form = XmlSchemaForm.Qualified)]
        public ST_XmlDataType XmlDataType { get; set; }

        [Optional]
        [XmlElement("extLst", Namespace = Constants.ExcelMain)]
        public ExtensionList ExtensionList { get; set; }

        public XmlColumnProperties() { }
    }
}
